home *** CD-ROM | disk | FTP | other *** search
/ Champak 114 / Vol 114.iso / games / park_thi.swf / scripts / DefineSprite_646 / frame_1 / DoAction.as
Encoding:
Text File  |  2010-08-12  |  1.1 KB  |  28 lines

  1. var Count = true;
  2. onEnterFrame = function()
  3. {
  4.    if(this.hitTest(myCarName))
  5.    {
  6.       if(Count == true)
  7.       {
  8.          if(this.hitTest(myCarName.hit1_mc) && this.hitTest(myCarName.hit2_mc) && this.hitTest(myCarName.hit3_mc) && this.hitTest(myCarName.hit4_mc) && this.hitTest(myCarName.hit5_mc) && this.hitTest(myCarName.hit6_mc) && this.hitTest(myCarName.hit7_mc) && this.hitTest(myCarName.hit8_mc) && myCarName.speed == 0)
  9.          {
  10.             Count = false;
  11.             myCarName.isMovable = false;
  12.             myCarName._name = myCarName.prevName;
  13.             _root.userCar = "";
  14.             myCarName.isPlayer = false;
  15.             _parent.valet_mc.hit = false;
  16.             _parent.valet_mc._visible = true;
  17.             _parent.valet_mc._x = _parent.spawn_mc._x;
  18.             _parent.valet_mc._y = _parent.spawn_mc._y;
  19.             _root.score += 500;
  20.             if(!_parent.park3_mc.Count && !_parent.park2_mc.Count && !_parent.park1_mc.Count)
  21.             {
  22.                _root.gotoAndStop("levelComplete");
  23.             }
  24.          }
  25.       }
  26.    }
  27. };
  28.